/*
 *  jOTR - Java Off-The-Record Messaging Library
 *  Copyright (C) 2007 Markus Karnik
 *
 *  This program is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU General Public License as published by the
 *  Free Software Foundation; either version 3 of the License, 
 *  or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 *  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
 *  for more details.
 *
 *  You should have received a copy of the GNU General Public License along 
 *  with this program; if not, see <http://www.gnu.org/licenses/>.
 *  
 */

package de.karnik.libjotr;

/**
 * Implements the jotr auth key storage. It stores the hmac and aes keys for the ake transmissions.
 * 
 * @author Markus Karnik - markus.karnik@my-design.org
 * @version 1.0
 * @since 1.0
 */
public class JotrAuthKeys {

    /**
     * The c key.
     */
    private byte[] cKey = null;
    /**
     * The ci key.
     */
    private byte[] ciKey = null;
    
    /**
     * The m1 key.
     */
    private byte[] m1Key = null;
    /**
     * The m2 key.
     */
    private byte[] m2Key = null;
    
    /**
     * The m1i key.
     */
    private byte[] m1iKey = null;
    /**
     * The m2i key.
     */
    private byte[] m2iKey = null;
	
    /**
     * Constructor. Sets the initial keys. See otr protocol description for further informations.
     * 
     * @param cKey The initial c key.
     * @param ciKey The initial ci key.
     * @param m1Key The initial m1 key.
     * @param m2Key The initial m2 key.
     * @param m1iKey The initial m1i key.
     * @param m2iKey The initial m2i key.
     */
    public JotrAuthKeys( byte[] cKey, byte[] ciKey, byte[] m1Key, byte[] m2Key, byte[] m1iKey, byte[] m2iKey ) {
		super();
		this.cKey = cKey;
		this.ciKey = ciKey;
		this.m1Key = m1Key;
		this.m2Key = m2Key;
		this.m1iKey = m1iKey;
		this.m2iKey = m2iKey;
	}

	/**
	 * Returns the c key.
	 * 
	 * @return The c key
	 */
	public byte[] getCKey() {
		return cKey;
	}

    /**
     * Sets the c key.
     * 
     * @param key The c key to set.
     */
    public void setCKey(byte[] key) {
		cKey = key;
	}

	/**
	 * Returns the ci key.
	 * 
	 * @return The ci key
	 */
    public byte[] getCiKey() {
		return ciKey;
	}
	
    /**
     * Sets the ci key.
     * 
     * @param key The ci key to set.
     */
    public void setCiKey(byte[] key) {
		ciKey = key;
	}
	
	/**
	 * Returns the m1 key.
	 * 
	 * @return The m1 key
	 */
    public byte[] getM1Key() {
		return m1Key;
	}
	
    /**
     * Sets the m1 key.
     * 
     * @param key The m1 key to set.
     */
    public void setM1Key(byte[] key) {
		m1Key = key;
	}
	
	/**
	 * Returns the m2 key.
	 * 
	 * @return The m2 key
	 */
    public byte[] getM2Key() {
		return m2Key;
	}
	
    /**
     * Sets the m2 key.
     * 
     * @param key The m2 key to set.
     */
    public void setM2Key(byte[] key) {
		m2Key = key;
	}
	
	/**
	 * Returns the m1i key.
	 * 
	 * @return The m1i key
	 */
    public byte[] getM1iKey() {
		return m1iKey;
	}
	
    /**
     * Sets the m1i key.
     * 
     * @param key The m1i key to set.
     */
    public void setM1iKey(byte[] key) {
		m1iKey = key;
	}
	
	/**
	 * Returns the m2i key.
	 * 
	 * @return The m2i key
	 */
    public byte[] getM2iKey() {
		return m2iKey;
	}
	
    /**
     * Sets the m2i key.
     * 
     * @param key The m2i key to set.
     */
    public void setM2iKey(byte[] key) {
		m2iKey = key;
	}
}